package com.yellowpage.bigdata.data;

import javax.persistence.*;
import java.sql.Date;

/**
 * Created by Sun on 11/16/2015.
 */
@Entity
@Table(name = "nsp_onofflog_ta_version_day", schema = "", catalog = "omc")
public class NspOnofflogTaVersionDay {
    private int nspOnofflogTaVersionDayId;
    private String logDate;
    private String version;
    private Integer imeiDayCount;
    private Integer androidCount;
    private Integer iosCount;
    private Integer imeiAllCount;
    private Integer imeiNewCount;
    private String createUser;
    private Date createTime;
    private String note;

    @Id
    @Column(name = "NSP_ONOFFLOG_TA_VERSION_DAY_ID", nullable = false, insertable = true, updatable = true)
    public int getNspOnofflogTaVersionDayId() {
        return nspOnofflogTaVersionDayId;
    }

    public void setNspOnofflogTaVersionDayId(int nspOnofflogTaVersionDayId) {
        this.nspOnofflogTaVersionDayId = nspOnofflogTaVersionDayId;
    }

    @Basic
    @Column(name = "LOG_DATE", nullable = true, insertable = true, updatable = true, length = 10)
    public String getLogDate() {
        return logDate;
    }

    public void setLogDate(String logDate) {
        this.logDate = logDate;
    }

    @Basic
    @Column(name = "VERSION", nullable = true, insertable = true, updatable = true, length = 30)
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Basic
    @Column(name = "IMEI_DAY_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getImeiDayCount() {
        return imeiDayCount;
    }

    public void setImeiDayCount(Integer imeiDayCount) {
        this.imeiDayCount = imeiDayCount;
    }

    @Basic
    @Column(name = "ANDROID_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getAndroidCount() {
        return androidCount;
    }

    public void setAndroidCount(Integer androidCount) {
        this.androidCount = androidCount;
    }

    @Basic
    @Column(name = "IOS_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getIosCount() {
        return iosCount;
    }

    public void setIosCount(Integer iosCount) {
        this.iosCount = iosCount;
    }

    @Basic
    @Column(name = "IMEI_ALL_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getImeiAllCount() {
        return imeiAllCount;
    }

    public void setImeiAllCount(Integer imeiAllCount) {
        this.imeiAllCount = imeiAllCount;
    }

    @Basic
    @Column(name = "IMEI_NEW_COUNT", nullable = true, insertable = true, updatable = true)
    public Integer getImeiNewCount() {
        return imeiNewCount;
    }

    public void setImeiNewCount(Integer imeiNewCount) {
        this.imeiNewCount = imeiNewCount;
    }

    @Basic
    @Column(name = "CREATE_USER", nullable = true, insertable = true, updatable = true, length = 18)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CREATE_TIME", nullable = true, insertable = true, updatable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "NOTE", nullable = true, insertable = true, updatable = true, length = 128)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NspOnofflogTaVersionDay that = (NspOnofflogTaVersionDay) o;

        if (nspOnofflogTaVersionDayId != that.nspOnofflogTaVersionDayId) return false;
        if (logDate != null ? !logDate.equals(that.logDate) : that.logDate != null) return false;
        if (version != null ? !version.equals(that.version) : that.version != null) return false;
        if (imeiDayCount != null ? !imeiDayCount.equals(that.imeiDayCount) : that.imeiDayCount != null) return false;
        if (androidCount != null ? !androidCount.equals(that.androidCount) : that.androidCount != null) return false;
        if (iosCount != null ? !iosCount.equals(that.iosCount) : that.iosCount != null) return false;
        if (imeiAllCount != null ? !imeiAllCount.equals(that.imeiAllCount) : that.imeiAllCount != null) return false;
        if (imeiNewCount != null ? !imeiNewCount.equals(that.imeiNewCount) : that.imeiNewCount != null) return false;
        if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = nspOnofflogTaVersionDayId;
        result = 31 * result + (logDate != null ? logDate.hashCode() : 0);
        result = 31 * result + (version != null ? version.hashCode() : 0);
        result = 31 * result + (imeiDayCount != null ? imeiDayCount.hashCode() : 0);
        result = 31 * result + (androidCount != null ? androidCount.hashCode() : 0);
        result = 31 * result + (iosCount != null ? iosCount.hashCode() : 0);
        result = 31 * result + (imeiAllCount != null ? imeiAllCount.hashCode() : 0);
        result = 31 * result + (imeiNewCount != null ? imeiNewCount.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
